<?php

namespace Platform\Models\Pay;

use Platform\Models\BaseModel;

class MoneyRecord extends BaseModel {

    const TABLE_NAME = 'money_record';
    const type_minibeg = 1;
    const type_withdraw_money = 2;

    public function initialize() {
        parent::initialize();
        $this->setSource(self::TABLE_NAME);
    }

    private $id;
    private $userId;
    private $money;
    private $type;
    private $createTime;
    private $openId;
    private $orderNo;
    private $resultJson;
    private $cash;

    public function getId() {
        return $this->id;
    }

    public function getUserId() {
        return $this->userId;
    }

    public function getMoney() {
        return $this->money;
    }

    public function getType() {
        return $this->type;
    }

    public function getCreateTime() {
        return $this->createTime;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function setUserId($userId) {
        $this->userId = $userId;
    }

    public function setMoney($money) {
        $this->money = $money;
    }

    public function setType($type) {
        $this->type = $type;
    }

    public function setCreateTime($createTime) {
        $this->createTime = $createTime;
    }

    public function getOpenId() {
        return $this->openId;
    }

    public function setOpenId($openId) {
        $this->openId = $openId;
    }

    public function getOrderNo() {
        return $this->orderNo;
    }

    public function getResultJson() {
        return $this->resultJson;
    }

    public function setOrderNo($orderNo) {
        $this->orderNo = $orderNo;
    }

    public function setResultJson($resultJson) {
        $this->resultJson = $resultJson;
    }

    public function getCash() {
        return $this->cash;
    }

    public function setCash($cash) {
        $this->cash = $cash;
    }

    public function columnMap() {
        //列名 =》 属性名
        return [
            'id' => 'id',
            'user_id' => 'userId',
            'money' => 'money',
            'type' => 'type',
            'create_time' => 'createTime',
            'open_id' => 'openId',
            "order_no" => "orderNo",
            "result_json" => "resultJson",
            "cash" => "cash"
        ];
    }

}
